﻿@using System.Web.Mvc.Html
@using GlobalResources
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.SendCommandModel

@if (Model.CanSendDeviceCommands)
{

    if (Model.HasCommands)
    {
        <fieldset class="command_form">
            <div class="tooltip_header non_float">
                @Html.LabelFor(m => m.Command, Strings.Method, new { @class = "command_form__label" })
                <img src="~/Content/img/icon_info_gray.svg" class="details_grid_info tooltip_icon" style="top:10px;" title="@Strings.MethodHeader" />
            </div>
            @Html.DropDownListFor(m => Model.Command, Model.CommandSelectList, Strings.SelectAMethod, new { @class = "command_form__select" })
            @Html.ValidationMessageFor(model => model.Command)
            @Html.AntiForgeryToken()
            <div id="command_form" class="container_command"></div>
        </fieldset>
    }
    else
    {
        <fieldset>
            <h3>@string.Format(Strings.NoMethodsAvailable, Model.DeviceId)</h3>
        </fieldset>
    }
}
else
{
    <fieldset>
        <h3>@string.Format(Strings.DeviceMethodIsDisabled)</h3>
    </fieldset>
}
